]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
layout: Cap each event to 15px of motion
authorJasper St. Pierre <jstpierre@mecheye.net>
Thu, 21 Feb 2013 22:19:04 +0000 (17:19 -0500)
committerJasper St. Pierre <jstpierre@mecheye.net>
Wed, 27 Feb 2013 19:01:42 +0000 (14:01 -0500)
When pressing against the bottom of the screen, we shouldn't
really take more than 15px from each event, to prevent spruious
mouse movements from opening the barrier.

https://bugzilla.gnome.org/show_bug.cgi?id=694467

js/ui/layout.js

index ad0ed42d7f11bc9c1bf4a76fd946c459769edd8a..f8b91b73a20fefce88ff38981155b6d6a5383768 100644 (file)
@@ -1330,7 +1330,7 @@ const PressureBarrier = new Lang.Class({
 
         this._trimBarrierEvents();
         this._barrierEvents.push(event);
-        this._currentPressure += distance;
+        this._currentPressure += Math.min(15, distance);
 
         if (this._currentPressure >= this._threshold) {
             this.emit('trigger');